package cn.com.git.admin.server.api.feign.upms;

import cn.com.git.admin.service.dto.*;
import cn.com.git.admin.service.query.SysNoteDictListQuery;
import cn.com.git.admin.service.query.SysResourceListQuery;
import cn.com.git.common.model.DataTree;
import cn.com.git.common.model.ResultMsg;
import cn.com.git.common.model.ResultPage;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

import java.util.List;

/**
 * 鉴权服务
 * @author zhangzhenfu
 * @Description
 * @date 2020/2/22 15:20
 */
public interface SystemFeignService {

    /*
           系统资源
        */
    @RequestLine("POST /sys_resource/list/page")
    @Headers({"Content-Type: application/json"})
    ResultPage<SysResourceListDTO> sysResourceListPage(SysResourceListQuery upmsPageQuery);
    @RequestLine("POST /sys_resource/list/tree")
    @Headers({"Content-Type: application/json"})
    ResultMsg<List<DataTree>> sysResourceListTree(SysResourceListQuery upmsPageQuery);
    @RequestLine("GET /sys_resource/find?id={id}")
    ResultMsg<SysResourceDetailDTO> sysResourceFind(@Param("id") Integer id);
    @RequestLine("POST /sys_resource/add")
    @Headers({"Content-Type: application/json"})
    ResultMsg<SysResourceSaveDTO> sysResourceAdd(SysResourceSaveDTO form);
    @RequestLine("POST /sys_resource/edit")
    @Headers({"Content-Type: application/json"})
    ResultMsg<SysResourceSaveDTO> sysResourceEdit(SysResourceSaveDTO form);
    @RequestLine("GET /sys_resource/delete?id={id}")
    ResultMsg sysResourceDelete(@Param("id") Integer id);

    /*
        系统码表
     */
    @RequestLine("POST /sys_note_dict/list/page")
    @Headers({"Content-Type: application/json"})
    ResultPage<SysNoteDictListDTO> sysNoteDictListPage(SysNoteDictListQuery upmsPageQuery);
    @RequestLine("GET /sys_note_dict/find?id={id}")
    ResultMsg<SysNoteDictDetailDTO> sysNoteDictFind(@Param("id") Integer id);
    @RequestLine("POST /sys_note_dict/add")
    @Headers({"Content-Type: application/json"})
    ResultMsg<SysNoteDictSaveDTO> sysNoteDictAdd(SysNoteDictSaveDTO form);
    @RequestLine("POST /sys_note_dict/edit")
    @Headers({"Content-Type: application/json"})
    ResultMsg<SysNoteDictSaveDTO> sysNoteDictEdit(SysNoteDictSaveDTO form);
    @RequestLine("GET /sys_note_dict/delete?id={id}")
    ResultMsg sysNoteDictDelete(@Param("id") Integer id);
}
